﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d" xmlns:ic="clr-namespace:Microsoft.Expression.Interactivity.Core;assembly=Microsoft.Expression.Interactions"
	x:Class="FileManager.FileObject"
	d:DesignWidth="640" d:DesignHeight="480" Width="122" Height="25" 
	MouseEnter="UserControl_MouseEnter"
	Tag="[draggable-movable]" MouseLeave="UserControl_MouseLeave"
	>
	<UserControl.Resources>
		<Style x:Key="HyperlinkButtonStyle1" TargetType="HyperlinkButton">
			<Setter Property="Foreground" Value="#FF73A9D8"/>
			<Setter Property="Padding" Value="2,0,2,0"/>
			<Setter Property="Cursor" Value="Hand"/>
			<Setter Property="HorizontalContentAlignment" Value="Left"/>
			<Setter Property="VerticalContentAlignment" Value="Top"/>
			<Setter Property="Background" Value="Transparent"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="HyperlinkButton">
						<Grid Cursor="{TemplateBinding Cursor}" Background="{TemplateBinding Background}">
							<VisualStateManager.VisualStateGroups>
								<VisualStateGroup x:Name="CommonStates">
									<VisualState x:Name="Normal"/>
									<VisualState x:Name="MouseOver">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="UnderlineTextBlock" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Pressed">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="UnderlineTextBlock" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Disabled">
										<Storyboard>
											<ObjectAnimationUsingKeyFrames Duration="0" Storyboard.TargetName="DisabledOverlay" Storyboard.TargetProperty="Visibility">
												<DiscreteObjectKeyFrame KeyTime="0">
													<DiscreteObjectKeyFrame.Value>
														<Visibility>Visible</Visibility>
													</DiscreteObjectKeyFrame.Value>
												</DiscreteObjectKeyFrame>
											</ObjectAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
								</VisualStateGroup>
								<VisualStateGroup x:Name="FocusStates">
									<VisualState x:Name="Focused">
										<Storyboard>
											<DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement" Storyboard.TargetProperty="Opacity">
												<SplineDoubleKeyFrame KeyTime="0" Value="1"/>
											</DoubleAnimationUsingKeyFrames>
										</Storyboard>
									</VisualState>
									<VisualState x:Name="Unfocused"/>
								</VisualStateGroup>
							</VisualStateManager.VisualStateGroups>
							<TextBlock x:Name="UnderlineTextBlock" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" Text="{TemplateBinding Content}" TextDecorations="Underline"/>
							<TextBlock x:Name="DisabledOverlay" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Visibility="Collapsed" Canvas.ZIndex="1" Foreground="#FFAAAAAA" Text="{TemplateBinding Content}"/>
							<ContentPresenter x:Name="contentPresenter" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}" Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
							<Rectangle x:Name="FocusVisualElement" Stroke="#FF6DBDD1" StrokeThickness="0" IsHitTestVisible="false" Opacity="0"/>
						</Grid>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
	</UserControl.Resources>

	<Grid x:Name="LayoutRoot" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top" Width="120" Cursor="Hand" Margin="1,1,0,0">
		<VisualStateManager.CustomVisualStateManager>
			<ic:ExtendedVisualStateManager/>
		</VisualStateManager.CustomVisualStateManager>
		<VisualStateManager.VisualStateGroups>
			<VisualStateGroup x:Name="VisualStateGroup">
				<VisualStateGroup.Transitions>
					<VisualTransition GeneratedDuration="00:00:00.1000000"/>
				</VisualStateGroup.Transitions>
				<VisualState x:Name="Hover">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.68"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="lnkDownload" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
						</DoubleAnimationUsingKeyFrames>
						<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="lnkDownload" Storyboard.TargetProperty="(Control.FontStyle)">
							<DiscreteObjectKeyFrame KeyTime="00:00:00">
								<DiscreteObjectKeyFrame.Value>
									<FontStyle>Normal</FontStyle>
								</DiscreteObjectKeyFrame.Value>
							</DiscreteObjectKeyFrame>
						</ObjectAnimationUsingKeyFrames>
						<ColorAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="lnkDownload" Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)">
							<EasingColorKeyFrame KeyTime="00:00:00" Value="Black"/>
						</ColorAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="lnkDownload" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.333"/>
						</DoubleAnimationUsingKeyFrames>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="lnkDownload" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="NoHover">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="lnkDownload" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
				<VisualState x:Name="UnHover">
					<Storyboard>
						<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="highlight" Storyboard.TargetProperty="(UIElement.Opacity)">
							<EasingDoubleKeyFrame KeyTime="00:00:00" Value="0.695"/>
						</DoubleAnimationUsingKeyFrames>
					</Storyboard>
				</VisualState>
			</VisualStateGroup>
		</VisualStateManager.VisualStateGroups>
		<Rectangle x:Name="highlight" Stroke="#FF75ABF2" RadiusX="5" RadiusY="1" Opacity="0">
			<Rectangle.Fill>
				<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
					<GradientStop Color="#FFD8D8D8" Offset="1"/>
					<GradientStop Color="White"/>
					<GradientStop Color="#FFC3D8EC" Offset="0.505"/>
				</LinearGradientBrush>
			</Rectangle.Fill>
		</Rectangle>
		<Image x:Name="FileObjectFileIcon" HorizontalAlignment="Left" Source="images/page_white.png" Stretch="None" VerticalAlignment="Top" Margin="2,2,0,0"/>
		<TextBlock x:Name="FileObjectFileName" TextWrapping="Wrap" Margin="20,2,0,0" VerticalAlignment="Top" Height="15" Text="FileName.txt" FontSize="9.333"/>
		<HyperlinkButton x:Name="lnkDownload" Margin="0,2" FontSize="9.333" OpacityMask="#FFB19494" HorizontalAlignment="Left" Opacity="0" Foreground="#FF73A9D8" RenderTransformOrigin="0.5,0.5" d:LayoutOverrides="Height" Background="{x:Null}" Style="{StaticResource HyperlinkButtonStyle1}">
			<HyperlinkButton.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform/>
				</TransformGroup>
			</HyperlinkButton.RenderTransform>
			<Image x:Name="DownloadIcon" Source="images/arrow_down.png" Stretch="None" VerticalAlignment="Top" Cursor="Hand"/>
		</HyperlinkButton>
                        
	</Grid>
</UserControl>